import { appConfig } from "./config/app"

const bootstrap = async () => {
  const app = await appConfig.useApp()
  app.useStaticAssets(appConfig.staticPath)
  app.enableCors(appConfig.corsOptions)
  app.setGlobalPrefix(appConfig.globalPrefix)
  app.use(appConfig.globalMiddleware)
  await app.listen(appConfig.port)
}
bootstrap().finally()
